home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-27 | 1.1 KB | 45 lines | [TEXT/CWIE] |
- /***************************************************************************
- File: SMTPDelEPThreadProc.cp
- Version: 1.0
- Purpose: A simple thread which simply deletes an object when
- next scheduled. Note that object must have been
- allocated from the standard new heap
-
- Author: Christopher Haupt (cfh)
- Copyright © 1996, Christopher Haupt
-
- Revision History:
- 960418.cfh New file
- ***************************************************************************/
-
- #pragma once
-
- #include "SMTPDelEPThreadProc.h"
- #include <LEndpoint.h>
- #include <LMacTCPEndpoint.h>
- #include <LOpenTptEndpoint.h>
-
- // ---------------------------------------------------------------------------
- // • DeleteObject
- // ---------------------------------------------------------------------------
- //
- void DeleteEndpointObject(LThread& , void* inObject)
- {
- LThread::Yield();
-
- switch (((LEndpoint *) inObject)->GetEndpointType())
- {
- case LMacTCPEndpoint::class_ID:
- delete ((LMacTCPEndpoint *)inObject);
- break;
-
- case LOpenTptEndpoint::class_ID:
- delete ((LOpenTptEndpoint *)inObject);
- break;
-
- default:
- delete ((LEndpoint *)inObject);
- break;
- }
- }
-